<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <!-- 移动端适配 -->
    <meta name="viewport" content="width=device-width, initial-scale=1.0"> 
    <title>hello_react</title>
</head>
<body>
    <div id="test"></div>

    <!-- react核心库，要在react-dom之前引入 -->
    <script type="text/javascript" src="../hello-react/js/react.development.js"></script>
    <!-- 引入react-dom。用于支持react操作dom -->
    <script type="text/javascript" src="../hello-react/js/react-dom.development.js"></script>
    <!-- 引入babel，将jsx转成js -->
    <script type="text/javascript" src="../hello-react/js/babel.min.js"></script>

    <!-- 此处要写babel -->
    <script type="text/babel">
        // 1、创建虚拟dom
        const VDOM = <h1>Hello,React</h1>
        // 2、渲染虚拟dom到页面,第一个参数是虚拟DOM，第二个参数是容器。
        ReactDOM.render(VDOM, document.getElementById('test'));
    </script>
</body>
</html>